Skip to content

chore(telemetry): configuration telemetry reporting #11115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Feb 25, 2025

Conversation

P403n1x87
Copy link
Contributor

@P403n1x87 P403n1x87 commented Oct 22, 2024

We refactor the implementation of the telemetry configuration reporting to use new API exposed by the latest release of envier. We also implement a configuration class that automatically reports configuration telemetry after the environment variables have been parsed and validated.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We refactor the implementation of the telemetry configuration reporting
to use new API exposed by the latest release of envier. We also
implement a configuration class that automatically reports configuration
telemetry after the environment variables have been parsed and
validated.
@P403n1x87 P403n1x87 added the changelog/no-changelog A changelog entry is not required for this PR. label Oct 22, 2024
Copy link
Contributor

github-actions bot commented Oct 22, 2024

CODEOWNERS have been resolved as:

.riot/requirements/1f27343.txt                                          @DataDog/apm-python
.riot/requirements/22104c1.txt                                          @DataDog/apm-python
.riot/requirements/bd5e098.txt                                          @DataDog/apm-python
ddtrace/settings/_telemetry.py                                          @DataDog/apm-core-python
ddtrace/settings/peer_service.py                                        @DataDog/apm-core-python
hatch.toml                                                              @DataDog/python-guild
lib-injection/sources/min_compatible_versions.csv                       @DataDog/apm-core-python
min_compatible_versions.csv                                             @DataDog/apm-core-python
pyproject.toml                                                          @DataDog/python-guild
riotfile.py                                                             @DataDog/apm-python
tests/telemetry/test_writer.py                                          @DataDog/apm-python
.riot/requirements/1215c62.txt                                          @DataDog/apm-python
.riot/requirements/17cd03c.txt                                          @DataDog/apm-python
.riot/requirements/1842297.txt                                          @DataDog/apm-python
.riot/requirements/19a8ed0.txt                                          @DataDog/apm-python
.riot/requirements/1c89113.txt                                          @DataDog/apm-python
.riot/requirements/1dcfbb2.txt                                          @DataDog/apm-python
.riot/requirements/1f540f4.txt                                          @DataDog/apm-python
.riot/requirements/46e7fca.txt                                          @DataDog/apm-python
.riot/requirements/4ef6c1c.txt                                          @DataDog/apm-python
.riot/requirements/5b09682.txt                                          @DataDog/apm-python
.riot/requirements/a031170.txt                                          @DataDog/apm-python
.riot/requirements/e1faa28.txt                                          @DataDog/apm-python

@P403n1x87 P403n1x87 requested a review from mabdinur October 22, 2024 12:26
@pr-commenter
Copy link

pr-commenter bot commented Oct 22, 2024

Benchmarks

Benchmark execution time: 2025-02-25 16:39:39

Comparing candidate commit 5d82b9a in PR branch refactor/config-telemetry with baseline commit f76498f in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 418 metrics, 2 unstable metrics.

@mabdinur mabdinur requested a review from erikayasuda October 22, 2024 14:55
@mabdinur mabdinur force-pushed the refactor/config-telemetry branch 2 times, most recently from f1d768f to d60ed8d Compare October 22, 2024 17:20
ensure recursivzely defined envier items are captured in telemetry
@mabdinur mabdinur force-pushed the refactor/config-telemetry branch from d60ed8d to 9bdab98 Compare October 22, 2024 17:21
@mabdinur mabdinur changed the title refactor: configuration telemetry reporting fix: configuration telemetry reporting Oct 22, 2024
@mabdinur
Copy link
Contributor

If this change is backported to the 2.15 branch before 2.15.0 is released then a release note is not required.
Otherwise we need to document the fact that v2.15.0 relies on private attributes in a third party library (envier).

cc: @erikayasuda

@mabdinur mabdinur marked this pull request as ready for review October 22, 2024 17:27
@mabdinur mabdinur requested review from a team as code owners October 22, 2024 17:27
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Oct 23, 2024

Datadog Report

Branch report: refactor/config-telemetry
Commit report: d53d283
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 18.66s Total duration (35m 42.64s time saved)

@P403n1x87 P403n1x87 force-pushed the refactor/config-telemetry branch from 001c613 to 1fcc6b5 Compare February 13, 2025 11:19
@mabdinur mabdinur force-pushed the refactor/config-telemetry branch from a194897 to 59ad686 Compare February 20, 2025 21:15
add DD_APPSEC_RASP_ENABLED to fix failing test

take 3
remove envier from min_compat_version

update aws_lambda min version for fix aws_lambda
@mabdinur mabdinur force-pushed the refactor/config-telemetry branch from 59ad686 to 1f86187 Compare February 20, 2025 21:17
@mabdinur mabdinur merged commit b4f4f62 into main Feb 25, 2025
781 checks passed
@mabdinur mabdinur deleted the refactor/config-telemetry branch February 25, 2025 20:11
Copy link
Contributor

The backport to 2.20 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.20 2.20
# Navigate to the new working tree
cd .worktrees/backport-2.20
# Create a new branch
git switch --create backport-11115-to-2.20
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b4f4f623d404bfc7919be2e02ce76282002e244a
# Push it to GitHub
git push --set-upstream origin backport-11115-to-2.20
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.20

Then, create a pull request where the base branch is 2.20 and the compare/head branch is backport-11115-to-2.20.

Copy link
Contributor

The backport to 3.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.0 3.0
# Navigate to the new working tree
cd .worktrees/backport-3.0
# Create a new branch
git switch --create backport-11115-to-3.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b4f4f623d404bfc7919be2e02ce76282002e244a
# Push it to GitHub
git push --set-upstream origin backport-11115-to-3.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.0

Then, create a pull request where the base branch is 3.0 and the compare/head branch is backport-11115-to-3.0.

Copy link
Contributor

The backport to 2.21 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.21 2.21
# Navigate to the new working tree
cd .worktrees/backport-2.21
# Create a new branch
git switch --create backport-11115-to-2.21
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b4f4f623d404bfc7919be2e02ce76282002e244a
# Push it to GitHub
git push --set-upstream origin backport-11115-to-2.21
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.21

Then, create a pull request where the base branch is 2.21 and the compare/head branch is backport-11115-to-2.21.

Copy link
Contributor

The backport to 3.1 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.1 3.1
# Navigate to the new working tree
cd .worktrees/backport-3.1
# Create a new branch
git switch --create backport-11115-to-3.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b4f4f623d404bfc7919be2e02ce76282002e244a
# Push it to GitHub
git push --set-upstream origin backport-11115-to-3.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.1

Then, create a pull request where the base branch is 3.1 and the compare/head branch is backport-11115-to-3.1.

mabdinur added a commit that referenced this pull request Feb 25, 2025
We refactor the implementation of the telemetry configuration reporting
to use new API exposed by the latest release of envier. We also
implement a configuration class that automatically reports configuration
telemetry after the environment variables have been parsed and
validated.

- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

- [ ] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Munir Abdinur <munir_abdinur@hotmail.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
mabdinur added a commit that referenced this pull request Feb 25, 2025
…to 3.1) (#12521)

We refactor the implementation of the telemetry configuration reporting
to use new API exposed by the latest release of envier. We also
implement a configuration class that automatically reports configuration
telemetry after the environment variables have been parsed and
validated.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
brettlangdon pushed a commit that referenced this pull request Mar 4, 2025
We refactor the implementation of the telemetry configuration reporting
to use new API exposed by the latest release of envier. We also
implement a configuration class that automatically reports configuration
telemetry after the environment variables have been parsed and
validated.

## Checklist
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Munir Abdinur <munir_abdinur@hotmail.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants